package com.exception.exceptiondemo.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Custom {


    @NotBlank(message = "姓名不能为空！")
    String name;

    @Length(max = 11,message = "手机号长度不能超过11位！")
    String phone;

}
